var myArr = ['Tom', 'Marry', 'Jack']; //数组
//字符串
var myname = 'xiatian';
//数字
//布尔值
var flag = true;
//元组
var msg = ['hello', 22, true];
//所有类型
var anyArr = [1, 2, 3, 'hello'];
//枚举
var Color;
(function (Color) {
    Color["red"] = "red";
    Color["black"] = "black";
    Color["pink"] = "pink";
})(Color || (Color = {}));
var likeColor = Color.black;
function getStr(str) {
    if (str.length) {
        return str.length;
    }
    else {
        return str.toString().length;
    }
}
var person = {
    id: 1,
    userName: "Tom",
    age: 27,
};
console.log(person);
console.log(getStr('hello world'));
console.log(getStr(1234));
console.log(likeColor);
console.log(myname);
console.log(myArr);
console.log(flag);
console.log(msg);
console.log(anyArr);
